-- Decompiled with the Synapse X Luau decompiler.

local M = _G.CommonOHOH.class.new(script);
function M.new(p1)
	return M(p1);
end;
function M.ctor(self, fuc)
	self.co_list = {};
	self.co_clock = {};
	self.del_list = {};
	self.time_count = {};
	self:SetTimeOutHandle(fuc);
end;
function M.dtor(self)
	self.co_clock = {};
	self.del_list = {};
	self.time_count = {};
end;
function M.SetTimeOutHandle(self, fuc)
	self.__time_out_handle = fuc;
end;

function M.CheckTimeOut(self)
	local now = os.clock();
	--local l__co_clock__2 = self.co_clock;
	--local l__time_count__3 = self.time_count;
	local handCount = 0;
	for co, endTime in pairs(self.co_clock) do
		handCount = handCount + 1;
		if endTime <= now then
			--l__time_count__3[co] = nil;
			--l__co_clock__2[co] = nil;
			--self.__time_out_handle(co, v1 - l__time_count__3[co]);
			----Older
			
			--print("CheckTimeOut::::",now,self.time_count[co])
			
			self.time_count[co] = nil;
			self.co_clock[co] = nil;
			self.__time_out_handle(co, now - endTime);
			
		end;
	end;
	return handCount > 0;
end;
function M.Add(self, co, time)
	local t = os.clock();
	--time = time and 0; Older
	if not time then
		time=0
	end
	time = time + t;
	self.time_count[co] = t;
	self.co_clock[co] = time;
end;
function M.Del(self, co)
	self.co_clock[co] = nil;
end;
return M;
